package com.soil.code.generation.application.entity;

import lombok.Data;
import org.apache.commons.lang3.StringUtils;

/**
 * @author zeno
 * @date 2022/8/9 14:27
 */
@Data
public class PersistenceTierSetting {

	/** 持久对象后缀 */
	private String poSuffix;

	/** 数据库访问对象后缀 */
	private String daoSuffix;

	public String doGetPOClassName(String poName){
		if (StringUtils.isBlank(poSuffix)){
			return poName;
		}
		return poName + poSuffix;
	}

	public String doGetDaoClassName(String poName){
		if (StringUtils.isBlank(daoSuffix)){
			return poName;
		}
		return poName + daoSuffix;
	}
}
